package com.zhny.aiot.sq.cloud.video.plugin;

import com.zhny.aiot.plugin.ICenterFacilities;
import com.zhny.aiot.plugin.IDevice;
import com.zhny.aiot.plugin.core.plugin.AbstractFactory;
import com.zhny.aiot.plugin.model.DeviceEntity;
import com.zhny.aiot.plugin.model.FactoryType;
import com.zhny.aiot.plugin.model.StoreEntity;
import com.zhny.aiot.sq.cloud.video.plugin.model.CloudVideoStore;
import org.pf4j.Extension;
import org.pf4j.Plugin;
import org.pf4j.PluginWrapper;

public class CloudVideoPlugin extends Plugin {
    public CloudVideoPlugin(PluginWrapper wrapper) {
        super (wrapper);
    }

    @Extension
    public static class CloudVideoFactory extends AbstractFactory<CloudVideoConfig> {

        @Override
        public Class<CloudVideoConfig> configClass() {
            return CloudVideoConfig.class;
        }

        @Override
        public IDevice createDevice(ICenterFacilities iCenterFacilities, DeviceEntity deviceEntity) {
            return new CloudVideoDevice (this,iCenterFacilities,deviceEntity);
        }

        @Override
        public Class<? extends StoreEntity> storeClass() {
            return CloudVideoStore.class;
        }

        @Override
        public String getId() {
            return "sq-cloud-video-plugin";
        }

        @Override
        public String getName() {
            return "云景全景监控摄像头";
        }

        @Override
        public FactoryType getType() {
            return FactoryType.CloudViewVideo;
        }
    }
}
